1. Field of the Invention
The present invention relates in general to data buffers and in particular to a method and apparatus for monitoring a data buffer and producing an alarm signal when the data buffer fails to operate properly.
2. Description of Related Art
Data buffers are employed in a wide variety of applications to temporarily store data. For example, when computers are interconnected to form a network they send data to one other via network buses. But since the various buses forming a network can have varying data transfer rates or different data transfer protocols, they cannot be directly linked to one another. However a data buffer linking two buses can receive and store data arriving on one bus using one data transfer rate and protocol and then later forward the data outward on another bus using another data transfer rate and protocol.
A network routing switch at the junction of several network buses may employ a data buffer at each of its input ports and each of its output ports. In such a switch input and output port buffers may share a common buffer memory in order to maximize the efficiency of memory use. Buffer memory space is usually organized into a set of uniformly sized "buffer cells" and data arriving on any bus can be stored in any set of unoccupied buffer cells. In such a buffer system, the sequence of data passing through a buffer at any hub or switch port may not be stored in a sequential set of buffer cells. Thus a typical buffer memory manager uses a "linked list" to keep track of the set of buffer cells that store the data for each port. Each successive entry of the linked list includes a pointer to a buffer cell containing successively received data. Each list entry also includes a pointer referencing the next entry of the list. When the buffer manager writes incoming data into a buffer cell it adds an entry pointing to the cell to the end of the linked list. Each time the buffer manager forwards data out of a buffer memory cell it reads the next entry pointer in the entry pointing to that cell to locate the list entry for the next data to be forwarded. The linked list for each buffered port may also be stored in a dedicated area of the buffer memory and the buffer manager keeps track of the addresses of the first and last entries of each list.
Buffer faults arise when the buffer manager fails to properly maintain the linked list. A buffer can have a "broken chain" fault when the next entry pointer within an entry other than the last entry of the list fails to point to another entry. Once the buffer manager has forwarded data from a buffer cell referenced by the entry with the faulty next entry pointer, the buffer manager cannot forward any more data out of the buffer memory because it can't find the next list entry. A buffer can have an "endless loop" fault when the next entry pointer of one list entry erroneously points to an earlier entry on the list. In such case the buffer manager will forward the same set of data out of memory until the faulty entry is overwritten.
What is needed is a means for monitoring a network buffer to determine when it has had a failure and for signaling an alarm when a failure has occurred. The alarm signal can be used, for example, to notify a system manager or to reset the buffer. Although in resetting a buffer all of the data stored in the buffer memory will be lost, any linked list errors will be eliminated because the linked lists will be discarded.
Prior art network buffers have employed "watchdog timers" to monitor buffer activity and signal when faults occur. Once such watchdog timer is the Access I/O Products Inc. model WDG-CSM Watchdog and Computer System Monitor Card illustrated in on Internet page address http://www.access-usa.com/wdgcsm.html published by Access I/O Products on Oct. 31, 1997. Another Internet page address http:www.indim.com/-outsrc/index.html published Oct. 31, 1997 by OutSource Engineering & Manufacturing describes a similar watchdog timer.
FIG. 1 illustrates a prior art use of a watchdog timer 2 for monitoring a network buffer 8. Buffer 8 receives and stores data arriving on a input bus (DATA.sub.-- IN) and forwards that data on an output bus (DATA.sub.-- OUT). Watchdog timer 2 includes a resettable counter 4 and a clock signal generator 6. Counter 4 counts pulses of a CLOCK signal produced by clock signal generator 6. Counter 4 may either count up from 0 to a level indicated by input LIMIT or down from the LIMIT level to 0. At any time the count may be reset to its starting point by a pulse in a signal applied to a RESET input of counter 4. If its count reaches its endpoint before it is reset, counter 4 produces an output ALARM signal.
The output terminal of a network buffer 8 is connected to the RESET input of counter 4 through a data detector 9. Data detector 9 monitors the buffer's output bus and pulses the RESET input whenever data is forwarded outward from buffer 8 on that bus. Thus counter 4 is reset whenever buffer 8 forwards data. Accordingly counter 4 will assert the ALARM signal whenever buffer 8 fails to produce output data for a period of time equal to the product of the CLOCK signal period and a number of CLOCK signal cycles referenced by the LIMIT data. Watchdog timer 2 will detect a break in a linked list or any other error that prevents buffer 8 from forwarding any data for a given amount of time. However watchdog timer 2 will not detect an endless loop fault that causes buffer 8 to endlessly forward the same set of stored data. Also watchdog timer 2 will incorrectly assert the ALARM signal when the output data traffic of buffer 8 ceases simply because its input data traffic ceases.
What is needed is an apparatus for monitoring a buffer memory and signaling an alarm whenever the buffer fails and which avoids signaling an alarm when the buffer does has not failed.